package com.personal.dto;

/**
 * @author 萌新
 * @version 1.0
 * @date 2021/4/19 21:30
 */

import com.personal.entity.ProductCategory;
import com.personal.enums.ProductCategoryStateEnum;

import java.util.List;

/**
 * 封装操作ProductCategory的返回结果，包括操作状态和ProductCategory信息
 */
public class ProductCategoryExecution {

    private int state;
    private String stateInfo;

    /** 因为是批量操作，所以使用List */
    private List<ProductCategory> productCategoryList;

    private int count;

    /**
     * 空参构造
     */
    public ProductCategoryExecution(){
        super();
    }

    /**
     * 操作成功的时候使用的构造函数，返回操作状态和ProductCategory集合
     * @param productCategoryStateEnum
     * @param productCategoryList
     * @param count
     */
    public ProductCategoryExecution(ProductCategoryStateEnum productCategoryStateEnum,List<ProductCategory> productCategoryList,int count){
        this.state = productCategoryStateEnum.getState();
        this.stateInfo = productCategoryStateEnum.getStateInfo();
        this.productCategoryList = productCategoryList;
        this.count = count;
    }

    public ProductCategoryExecution(ProductCategoryStateEnum productCategoryStateEnum){
        this.state = productCategoryStateEnum.getState();
        this.stateInfo = productCategoryStateEnum.getStateInfo();
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public List<ProductCategory> getProductCategoryList() {
        return productCategoryList;
    }

    public void setProductCategoryList(List<ProductCategory> productCategoryList) {
        this.productCategoryList = productCategoryList;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }
}
